<include file="Public:head" />
<include file="Public:header" />
<include file="Public:left" />
<section id='content'>
    <div class='container-fluid'>
        <div class='row-fluid' id='content-wrapper'>
            <div class='span12'>
                <div class='row-fluid'>
                    <div class='span12'>
                        <div class='page-header'>
                            <h1 class='pull-left'>
                                <i class='icon-ok'></i>
                                <span>职位管理</span>
                            </h1>
                        </div>
                    </div>
                </div>
                <div class='row-fluid'>
                    <div class='span12 box'>
                        <div class='box-header blue-background'>
                            <div class='title'>修改职位</div>
                        </div>
                        <div class='box-content'>
                            <form name="form" method="post" action="{:U('Company/save_hiring',array('hiring_id'=>$list['hiring_id']))}"  class='form form-horizontal validate-form' style='margin-bottom: 0;'>
                                <input type="hidden" name="hiring_id" value="{$Think.get.hiring_id}" />
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>岗位标题：</label>
                                    <div class='controls'>
                                        <input data-rule-minlength='2' data-rule-required='true' id='title' name='title' type='text' value="{$list.title}" />
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>招聘品牌：</label>
                                    <div class='controls'>
                                        <volist name="brand" id="b">
                                            <in name="b.bid" value="$list.brand">
                                            <input name="brand[]" type="checkbox" value="{$b.bid}" checked/> {$b.brand_name}  &nbsp; 
                                            <else/>
                                            <input name="brand[]" type="checkbox" value="{$b.bid}" /> {$b.brand_name}  &nbsp; 
                                            </in>
                                            
                                            </volist>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>工作地址：</label>
                                    <div class='controls'>
                                       <ul>
                                            <volist name="workplace" id="w">
                                            <li>
                                                <strong>{$w.area}</strong> &nbsp;
                                                <volist name="w.stores" id="s">
                                                    <in name="s.sid" value="$list.workplace">
                                                        <input name="workplace[]" type="checkbox" value="{$s.sid}" checked/> {$s.store_name}   &nbsp;  &nbsp; &nbsp;  
                                                        <else/>
                                                        <input name="workplace[]" type="checkbox" value="{$s.sid}" /> {$s.store_name}   &nbsp;  &nbsp; &nbsp; 
                                                    </in>
                                                </volist>
                                            </li>
                                            </volist>
                                        </ul>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>平均工资：</label>
                                    <div class='controls'>
                                        <input name="info[salary]" type="text" class="text" value="{$list.salary}" />
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>学历要求：</label>
                                    <div class='controls'>
                                        <select class="select" name="info[edu]">
                                            <option value="">选择学历</option>
                                            <volist name="edu" id="e">
                                            <option value="{$e.eid}" <if condition="$e['eid'] eq $list['edu']">selected</if>>{$e.edu}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>年龄要求：</label>
                                    <div class='controls'>
                                       <input name="info[age_start]" type="text" class="text" style="width:100px;" value="{$list.age_start}"/> 到 <input name="info[age_end]" type="text" class="text" style="width:100px;" value="{$list.age_end}"/>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>性别要求：</label>
                                    <div class='controls'>
                                       <input name="info[sex]" type="radio" value="1" <if condition="$list['sex'] eq 1">checked</if> /> 男 &nbsp; &nbsp; &nbsp; 
                                        <input name="info[sex]" type="radio" value="2" <if condition="$list['sex'] eq 2">checked</if> /> 女  &nbsp; &nbsp; &nbsp; 
                                        <input name="info[sex]" type="radio" value="0" <if condition="$list['sex'] eq 0">checked</if> /> 不限
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>身高要求：</label>
                                    <div class='controls'>
                                      <select class="select" name="info[height]">
                                        <option value="">选择身高</option>
                                        <volist name="height" id="h">
                                        <option value="{$i}" <if condition="$i eq $list['height']">selected</if>>{$h}</option>
                                        </volist>
                                    </select> CM
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>工作经验：</label>
                                    <div class='controls'>
                                        <select class="select" name="info[exper]">
                                            <option value="">选择经验</option>
                                            <volist name="exper" id="e">
                                            <option value="{$i}" <if condition="$i eq $list['exper']">selected</if>>{$e}</option>
                                            </volist>
                                        </select>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>工作时间：</label>
                                    <div class='controls'>
                                      <select class="select" name="info[worktime]">
                                        <option value="">选择工作时间</option>
                                        <volist name="worktime" id="w">
                                        <option value="{$w.wid}" <if condition="$w['wid'] eq $list['worktime']">selected</if>>{$w.time}</option>
                                        </volist>
                                    </select>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>福利待遇：</label>
                                    <div class='controls'>
                                      <input name="info[welfare]" type="text" class="text" value="{$list.welfare}" />
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>岗位描述：</label>
                                    <div class='controls'>
                                      <textarea name="info[intro]" cols="" rows="">{$list.intro}</textarea>
                                    </div>
                                </div>
                                <div class='control-group'>
                                    <label class='control-label' for='company_agent'>新简历通知：</label>
                                    <div class='controls'>
                                     <volist name="manage" id="m"><in name="m.bid" value="$list.notice"><input name="info[notice][]" type="checkbox" value="{$m.bid}" checked/> {$m.wx_name} <else/><input name="info[notice][]" type="checkbox" value="{$m.bid}"/> {$m.wx_name}</in></volist>
                                    </div>
                                </div>
                                <div class='form-actions' style='margin-bottom:0'>
                                    <button class='btn btn-primary' type='submit'>
                                        <i class='icon-save'></i>
                                        修改职位
                                    </button>
                                </div>
      
        </form>
                        </div>
                    </div>
                </div>
                
            </div>
        </div>
    </div>
</section>
</div>
<include file="Public:bottom" />
<script type="text/javascript">
    $(document).ready(function () {
		$("ul[class='nav nav-stacked']").removeClass('in');
        $("#jobs").addClass('in');
     
		$(".pro").change(function(){
			pro = $(this).val();
			$.post("__URL__/getarea",{type:'city',aid:pro},function(res){
				$(".city option").remove();
				$(".city").append("<option value='0'>市</option>");
				for(i=0;i<res.length;i++){
					$(".city").append("<option value='"+res[i]['area_id']+"'>"+res[i]['title']+"</option>");
				}
			},'json');
		});
		$(".city").change(function(){
			city = $(this).val();
			$.post("__URL__/getarea",{type:'area',aid:city},function(res){
				$(".area option").remove();
				$(".area").append("<option value='0'>区</option>");
				for(i=0;i<res.length;i++){
					$(".area").append("<option value='"+res[i]['area_id']+"'>"+res[i]['title']+"</option>");
				}
				//alert(res);
			},'json');
		});
    });
</script>